package com.it.plic;

import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * @author げっしょく
 * @date 2021/8/8
 */
public class Demo3 {
    public static void main(String[] args) throws IOException {
            DatagramSocket ds = new DatagramSocket();
            String s = "你好，牛马";
            byte[] b = s.getBytes();
            InetAddress ads = InetAddress.getByName("224.0.1.0");
            DatagramPacket dp = new DatagramPacket(b, b.length, ads, 10000);
            ds.send(dp);
            ds.close();
    }
}
